-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Edit code reference (L18->L19) to align Python example with other languages (programming languages and spoken languages) #1982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
harsha509
merged 1 commit into
SeleniumHQ:trunk
from
zipperer:trunk-zipperer-python-request-element-information
Oct 7, 2024
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On page https://www.selenium.dev/documentation/webdriver/getting_started/first_script/ in section "7. Request element information" Python example shows getting message element ```python3 message = driver.find_element(by=By.ID, value="message") ``` instead of getting message element information ```python3 text = message.text ``` The examples for other programming languages show getting the `text` attribute of the `message` element. And the examples for Python in other spoken languages show getting the `text` attribute of the `message` element. This commit changes the code reference to the Python file from L18 to L19 in the English markdown file. This makes the Python example show getting the `text` attribute from the `message` element. After this change: - the Python example is like the examples for other programming languages - the Python example on first_script.en.md is like the Python example for these: first_script.{zh-cn,pt-br,ja}.md
👷 Deploy request for selenium-dev pending review.Visit the deploys page to approve it
|
@qodo-merge-pro
qodo-merge-pro
bot
added
documentation
Improvements or additions to documentation
Review effort [1-5]: 1
labels
Oct 6, 2024
PR Reviewer Guide 🔍
Here are some key observations to aid the review process:
⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected
PR Code Suggestions ✨
No code suggestions found for the PR.
harsha509
harsha509
approved these changes
Oct 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @zipperer !
selenium-ci
added a commit
that referenced
this pull request
Oct 7, 2024
...guages (programming languages and spoken languages) (#1982) [deploy site] Edit code reference (L18->L19) to align Python example with others On page https://www.selenium.dev/documentation/webdriver/getting_started/first_script/ in section "7. Request element information" Python example shows getting message element ```python3 message = driver.find_element(by=By.ID, value="message") ``` instead of getting message element information ```python3 text = message.text ``` The examples for other programming languages show getting the `text` attribute of the `message` element. And the examples for Python in other spoken languages show getting the `text` attribute of the `message` element. This commit changes the code reference to the Python file from L18 to L19 in the English markdown file. This makes the Python example show getting the `text` attribute from the `message` element. After this change: - the Python example is like the examples for other programming languages - the Python example on first_script.en.md is like the Python example for these: first_script.{zh-cn,pt-br,ja}.md a039da8
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
User description
Description
On page
https://www.selenium.dev/documentation/webdriver/getting_started/first_script/ in section "7. Request element information"
Python example shows getting message element
instead of getting message element information
20241006-selenium-website-codeblock-python-get-message-element-english
The examples for other programming languages show getting the
textattribute of themessageelement, e.g.20241006-selenium-website-codeblock-java-get-message-element-attribute
And the examples for Python in other spoken languages show getting the
textattribute of themessageelement.20241006-selenium-website-codeblock-python-get-message-element-not-english
This commit changes the English markdown file. It edits the code reference to the Python file from L18 to L19.
This makes the Python example show getting the
textattribute from themessageelement.After this change:
Motivation and Context
Align code examples across programming languages and spoken languages.
Types of changes
Checklist
PR Type
documentation
Description
textattribute of themessageelement, aligning it with examples in other programming languages.Changes walkthrough 📝
first_script.en.md
Align Python code example with other languages in documentationwebsite_and_docs/content/documentation/webdriver/getting_started/first_script.en.md
the
textattribute.